<html>
<head>
	<title>Serialization benchmark results</title>
	<link href='default.css' rel='stylesheet' type='text/css' />
</head>
<body>

<h2>Results of <span>Northwind database tables serialization</span> benchmarks run at 06/02/2010</h2>
<span class="summary">These benchmarks show the total time in ticks (1/1000ms) that it takes each serializer to serialize and deserialize each entire table from the  <a href='http://code.google.com/p/servicestack/source/browse/trunk/Common/Northwind.Benchmarks/Northwind.Common/DataModel/NorthwindData.cs'>Northwind Database</a> (3202 records) <strong>1,000</strong> Times. <br/><br/>The full source code of the serialization benchmarks (which generated this report) is <a href='http://code.google.com/p/servicestack/source/browse/trunk/Common/Northwind.Benchmarks/Northwind.Benchmarks.Console/Program.cs'>available here</a>.</span><div id='combined'>
<h3>Combined results of all benchmarks below</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>460508</td><th>4.08x</th><td>23572581</td><td>77371731</td><td>100944312</td><td>100944.312</td><th>5.58x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>344645</td><th>3.06x</th><td>53973849</td><td>160503553</td><td>214477402</td><td>214477.402</td><th>11.86x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>118407</td><th>1.05x</th><td>64465092</td><td>29028078</td><td>93493170</td><td>93493.17</td><th>5.17x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>346173</td><th>3.07x</th><td>56310918</td><td>144102181</td><td>200413099</td><td>200413.099</td><th>11.08x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>112762</td><th>1x</th><td>8076622</td><td>10010642</td><td>18087264</td><td>18087.264</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>247146</td><th>2.19x</th><td>27329297</td><td>28106553</td><td>55435850</td><td>55435.85</td><th>3.06x</th></tr>
</tbody>
</table>
</div>
<h3>Results of serializing and deserializing CategoryDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>1232</td><th>3.23x</th><td>53954</td><td>132810</td><td>186764</td><td>186.764</td><th>3.98x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>672</td><th>1.76x</th><td>110160</td><td>245512</td><td>355672</td><td>355.672</td><th>7.58x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>1127</td><th>2.96x</th><td>197811</td><td>186276</td><td>384087</td><td>384.087</td><th>8.19x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>790</td><th>2.07x</th><td>96947</td><td>269389</td><td>366336</td><td>366.336</td><th>7.81x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>381</td><th>1x</th><td>20230</td><td>26684</td><td>46914</td><td>46.914</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>598</td><th>1.57x</th><td>35627</td><td>48071</td><td>83698</td><td>83.698</td><th>1.78x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing CustomerDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>32721</td><th>2.62x</th><td>1284468</td><td>5198743</td><td>6483211</td><td>6483.211</td><th>4.09x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>23869</td><th>1.91x</th><td>1539308</td><td>8263532</td><td>9802840</td><td>9802.84</td><th>6.19x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>16132</td><th>1.29x</th><td>3160535</td><td>2784726</td><td>5945261</td><td>5945.261</td><th>3.75x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>25229</td><th>2.02x</th><td>2468775</td><td>5311969</td><td>7780744</td><td>7780.744</td><th>4.91x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>12492</td><th>1x</th><td>704093</td><td>879312</td><td>1583405</td><td>1583.405</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>19140</td><th>1.53x</th><td>984840</td><td>1388573</td><td>2373413</td><td>2373.413</td><th>1.50x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing EmployeeDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>7437</td><th>1.89x</th><td>262705</td><td>799939</td><td>1062644</td><td>1062.644</td><th>3.70x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>6160</td><th>1.57x</th><td>478659</td><td>1688808</td><td>2167467</td><td>2167.467</td><th>7.54x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>5247</td><th>1.34x</th><td>793931</td><td>515705</td><td>1309636</td><td>1309.636</td><th>4.56x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>6241</td><th>1.59x</th><td>518251</td><td>1507284</td><td>2025535</td><td>2025.535</td><th>7.05x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>3930</td><th>1x</th><td>130649</td><td>156822</td><td>287471</td><td>287.471</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>5187</td><th>1.32x</th><td>278021</td><td>333832</td><td>611853</td><td>611.853</td><th>2.13x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing EmployeeTerritoryDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>5236</td><th>0x</th><td>169822</td><td>635844</td><td>805666</td><td>805.666</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>1912</td><th>0x</th><td>258882</td><td>1026632</td><td>1285514</td><td>1285.514</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>1969</td><th>0x</th><td>543690</td><td>499314</td><td>1043004</td><td>1043.004</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>2647</td><th>0x</th><td>535347</td><td>1139401</td><td>1674748</td><td>1674.748</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>980</td><th>0x</th><td>116672</td><td>-1</td><td>116671</td><td>116.671</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>2157</td><th>0x</th><td>165435</td><td>211235</td><td>376670</td><td>376.67</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing OrderDetailDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>331678</td><th>0x</th><td>22533977</td><td>63201169</td><td>85735146</td><td>85735.146</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>165567</td><th>0x</th><td>30220037</td><td>113255440</td><td>143475477</td><td>143475.477</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>78378</td><th>0x</th><td>36462159</td><td>30450609</td><td>66912768</td><td>66912.768</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>204384</td><th>0x</th><td>64403055</td><td>131718073</td><td>196121128</td><td>196121.128</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>60253</td><th>0x</th><td>7829370</td><td>-1</td><td>7829369</td><td>7829.369</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>169694</td><th>0x</th><td>25266310</td><td>23628087</td><td>48894397</td><td>48894.397</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing OrderDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>400652</td><th>4.64x</th><td>21268844</td><td>68525603</td><td>89794447</td><td>89794.447</td><th>5.81x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>302174</td><th>3.50x</th><td>50860234</td><td>145770842</td><td>196631076</td><td>196631.076</td><th>12.73x</th></tr><tr class='best-size'><th class='c1'>Microsoft BinaryFormatter</th><td>86323</td><th>1x</th><td>58378628</td><td>23757963</td><td>82136591</td><td>82136.591</td><th>5.32x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>302158</td><th>3.50x</th><td>51859015</td><td>133710067</td><td>185569082</td><td>185569.082</td><th>12.01x</th></tr><tr class='best-time'><th class='c1'>ProtoBuf.net</th><td>90569</td><th>1.05x</th><td>6903014</td><td>8545316</td><td>15448330</td><td>15448.33</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>212942</td><th>2.47x</th><td>25559471</td><td>25634618</td><td>51194089</td><td>51194.089</td><th>3.31x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing ProductDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>25851</td><th>0x</th><td>1006536</td><td>4238082</td><td>5244618</td><td>5244.618</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>15365</td><th>0x</th><td>1507528</td><td>7399891</td><td>8907419</td><td>8907.419</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>6819</td><th>0x</th><td>2197738</td><td>1973954</td><td>4171692</td><td>4171.692</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>15449</td><th>0x</th><td>1930226</td><td>7235116</td><td>9165342</td><td>9165.342</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>4044</td><th>0x</th><td>298710</td><td>-1</td><td>298709</td><td>298.709</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>13517</td><th>0x</th><td>849414</td><td>1254074</td><td>2103488</td><td>2103.488</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing RegionDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>485</td><th>0x</th><td>29423</td><td>75198</td><td>104621</td><td>104.621</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>159</td><th>0x</th><td>50579</td><td>116612</td><td>167191</td><td>167.191</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>628</td><th>0x</th><td>112587</td><td>121048</td><td>233635</td><td>233.635</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>159</td><th>0x</th><td>36133</td><td>110008</td><td>146141</td><td>146.141</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>54</td><th>0x</th><td>7274</td><td>-1</td><td>7273</td><td>7.273</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>135</td><th>0x</th><td>20321</td><td>14445</td><td>34766</td><td>34.766</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing ShipperDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>486</td><th>4.42x</th><td>30368</td><td>69871</td><td>100239</td><td>100.239</td><th>5.87x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>198</td><th>1.8x</th><td>51296</td><td>116702</td><td>167998</td><td>167.998</td><th>9.85x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>700</td><th>6.36x</th><td>117949</td><td>125810</td><td>243759</td><td>243.759</td><th>14.28x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>198</td><th>1.8x</th><td>38160</td><td>103085</td><td>141245</td><td>141.245</td><th>8.28x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>110</td><th>1x</th><td>7550</td><td>9514</td><td>17064</td><td>17.064</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>168</td><th>1.53x</th><td>20959</td><td>14463</td><td>35422</td><td>35.422</td><th>2.08x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing SupplierDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>11521</td><th>2.79x</th><td>443502</td><td>1765502</td><td>2209004</td><td>2209.004</td><th>4.49x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>8253</td><th>2.00x</th><td>596529</td><td>2877892</td><td>3474421</td><td>3474.421</td><th>7.07x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>6032</td><th>1.46x</th><td>1100075</td><td>950345</td><td>2050420</td><td>2050.42</td><th>4.17x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>8238</td><th>1.99x</th><td>788884</td><td>1967787</td><td>2756671</td><td>2756.671</td><th>5.61x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>4135</td><th>1x</th><td>220147</td><td>271375</td><td>491522</td><td>491.522</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>6322</td><th>1.53x</th><td>298521</td><td>453387</td><td>751908</td><td>751.908</td><th>1.53x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing TerritoryDto 1,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>6459</td><th>5.64x</th><td>228740</td><td>879263</td><td>1108003</td><td>1108.003</td><th>5.21x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>3319</td><th>2.90x</th><td>337663</td><td>1540265</td><td>1877928</td><td>1877.928</td><th>8.83x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>2846</td><th>2.49x</th><td>716163</td><td>707253</td><td>1423416</td><td>1423.416</td><th>6.70x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>3319</td><th>2.90x</th><td>540886</td><td>1232600</td><td>1773486</td><td>1773.486</td><th>8.34x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>1145</td><th>1x</th><td>90939</td><td>121619</td><td>212558</td><td>212.558</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>2789</td><th>2.44x</th><td>151858</td><td>233609</td><td>385467</td><td>385.467</td><th>1.81x</th></tr>
</tbody>
</table>
</body>
</html>

